﻿using SanJ.FreeCare.Abp.Authorization.Users;
using System;
using System.Threading.Tasks;
using Volo.Abp.Domain.Services;

namespace SanJ.FreeCare.Chat
{
    public interface IChatMessageManager : IDomainService
    {
        Task SendMessageAsync(UserIdentifier sender, UserIdentifier receiver, string message, string senderTenancyName, string senderUserName, Guid? senderProfilePictureId);

        Task<Guid> Save(ChatMessage message);

        Task<int> GetUnreadMessageCount(UserIdentifier userIdentifier, UserIdentifier sender);

        Task<ChatMessage> FindMessageAsync(Guid id, Guid userId);
    }
}
